package com.cap.bts.crmdp.dealer.coupon.dao;

import java.util.List;

import com.cap.bts.crmdp.dealer.coupon.domain.Ticket;
import com.cap.bts.crmdp.dealer.coupon.dto.TicKetDefineDto;
import com.cap.bts.framework.common.dao.IBaseDao;
import com.cap.bts.framework.common.exception.AppException;

/**
 * 优惠券和提货券处理接口
 * @author lizhiyong 
 * @version $Id: ITicKetDefineDao.java, v 0.1 2015-9-10 下午2:02:40 1111 Exp $
 */
public interface ITicKetDefineDao extends IBaseDao<Ticket, Long> {

    /**
     * 新增提货券和优惠券信息
     * @param ticket
     * @return
     * @throws AppException
     */
    public Ticket insertTicketInfo(Ticket ticket) throws AppException;

    /**
     * 提货券和优惠券信息查询
     * @param ticKetDefineDto
     * @return
     * @throws AppException
     */
    public List<Ticket> getTicketList(TicKetDefineDto ticKetDefineDto) throws AppException;

    /**
     * 根据优惠券名称查询信息
     * @param ticKetDefineDto
     * @return
     * @throws AppException
     */
    public boolean getTicketByTicketName(TicKetDefineDto ticKetDefineDto) throws AppException;

    /**
     * 取得优惠券定义列表
     * @Date        :      Sep 10, 2015
     * @return
     * @throws AppException
     */
    public List<Ticket> getCouponTicketList() throws AppException;

    /**
     * 根据优惠券和提货券ID查询信息
     * @param id
     * @return
     * @throws AppException
     */
    public Ticket getTicketById(String id) throws AppException;

    /**
     * 查询所有的优惠券和提货券信息
     * @return
     * @throws AppException
     */
    public List<Ticket> getAllTicketList() throws AppException;

    /**
     * 修改优惠券和提货券信息
     * @param ticKetDefineDto
     * @return
     * @throws AppException
     */
    public boolean updateTicketInfo(TicKetDefineDto ticKetDefineDto) throws AppException;
    
    /**
     * 根据优惠券名称查询信息
     * @param ticKetDefineDto
     * @return
     * @throws AppException
     */
    public Ticket getTicketByTicketName2(TicKetDefineDto ticKetDefineDto) throws AppException;
    
}
